﻿@{
    Layout = "~/Views/Shared/_Index.cshtml";
    var infoTabView = Html.GetRuntimeUivIew("Details");
    var infoGroupTabView = Html.GetRuntimeUivIew("InfoGroups");
    var actionTabView = Html.GetRuntimeUivIew("Actions");
    var elementTabView = Html.GetRuntimeUivIew("Elements");
    var nodeCareTabView = Html.GetRuntimeUivIew("OntologyNodeCares", "Node");
    var catalogTabView = Html.GetRuntimeUivIew("Catalogs");
    var prifix = "Edi_Ontology_Index_";
}
<div id="@(prifix)helperSplitter" class="mini-splitter helperSplitter" style="width: 100%; height: 100%;">
    <div showcollapsebutton="true">
        <div id="@(prifix)splitter" class="mini-splitter" style="width: 100%; height: 100%;">
            <div size="380" showcollapsebutton="true">
                <div class="mini-toolbar" style="border-left: 0; border-right: 0; border-top: 0px; padding: 2px;">
                    <div style="float: left">
                        @{Html.RenderPartial("Partials/UiViewButtons");}
                        @if (this.CurrentUser().IsDeveloper()) {
                            <a href="/api/Ontology/GetAll" target="_blank">本体文档</a>
                        }
                    </div>
                    <div style="float: right">
                    </div>
                    <div style="clear: both;">
                    </div>
                </div>
                <!--撑满页面-->
                <div class="mini-fit">
                    <div id="@(prifix)datagrid1" class="mini-datagrid" style="width:100%;height:100%;" allowalternating="true"
                         url="@Url.Action("GetPlistOntologies")" idfield="Id" multiselect="true"
                         sizelist="[5,10,20,50]" showpager="true" pagesize="100" allowcelledit="true">
                        <div property="columns">
                            <div type="indexcolumn" width="20"></div>
                            <div type="checkcolumn" width="20"></div>
                            <div name="action" width="50" headeralign="center" align="center" cellstyle="padding:0;">
                            </div>
                            <div field="Icon" width="50" headeralign="center" align="center" allowsort="false">
                                @Html.IconLabel("Icon")
                            </div>
                            <div field="Name" width="100" headeralign="center" allowsort="false">
                                @Html.IconLabel("Name")
                            </div>
                            <div field="Code" width="100" headeralign="center" allowsort="false">
                                @Html.IconLabel("Code")
                            </div>
                            <div field="IsEnabled" width="60" headeralign="center" allowsort="false">
                                @Html.IconLabel("IsEnabled")
                            </div>
                            <div field="IsCataloguedEntity" width="50" type="checkboxcolumn" headeralign="center" align="center" allowsort="false">
                                @Html.IconLabel("IsCataloguedEntity")
                            </div>
                            <div field="IsLogicalDeletionEntity" width="50" type="checkboxcolumn" headeralign="center" align="center" allowsort="false">
                                @Html.IconLabel("IsLogicalDeletionEntity")
                            </div>
                            <div field="CanAction" width="50" type="checkboxcolumn" headeralign="center" align="center" allowsort="false">
                                @Html.IconLabel("CanAction")
                            </div>
                            <div field="CanCommand" width="50" type="checkboxcolumn" headeralign="center" align="center" allowsort="false">
                                @Html.IconLabel("CanCommand")
                            </div>
                            <div field="CanEvent" width="50" type="checkboxcolumn" headeralign="center" align="center" allowsort="false">
                                @Html.IconLabel("CanEvent")
                            </div>
                            <div field="SortCode" width="50" headeralign="center" align="center" allowsort="false">
                                @Html.IconLabel("SortCode")
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div showcollapsebutton="true">
                <div id="@(prifix)tabs1" class="mini-tabs" style="width: 100%; height: 100%;display:none;"
                     activeindex="0" bodystyle="padding:0;border:0;">
                    @if (infoTabView.Permit())
                    {
                        <div name="infoTab" bodycls="inner" title="@infoTabView.Title" iconstyle="background:url(/content/icons/16x16/@infoTabView.Icon)">
                        </div>
                    }
                    @if (actionTabView.Permit())
                    {
                        <div name="actionTab" title="@actionTabView.Title" iconstyle="background:url(/content/icons/16x16/@actionTabView.Icon)">
                        </div>
                    }
                    @if (infoGroupTabView.Permit())
                    {
                        <div name="infoGroupTab" title="@infoGroupTabView.Title" iconstyle="background:url(/content/icons/16x16/@infoGroupTabView.Icon)">
                        </div>
                    }
                    @if (elementTabView.Permit())
                    {
                        <div name="elementTab" title="@elementTabView.Title" iconstyle="background:url(/content/icons/16x16/@elementTabView.Icon)">
                        </div>
                    }
                    @if (nodeCareTabView.Permit())
                    {
                        <div name="nodeCareTab" title="@nodeCareTabView.Title" iconstyle="background:url(/content/icons/16x16/@nodeCareTabView.Icon)">
                        </div>
                    }
                    @if (catalogTabView.Permit())
                    {
                        <div name="catalogTab" title="@catalogTabView.Title" iconstyle="background:url(/content/icons/16x16/@catalogTabView.Icon)">
                        </div>
                    }
                    @{
                        var operationLogView = this.GetOperationLogEntityType();
                        if (operationLogView.Permit()) {
                            <div name="operationLogTab" bodycls="inner" title="@operationLogView.Title" iconstyle="background:url(/content/icons/16x16/@operationLogView.Icon)">
                            </div>
                        }
                    }
                </div>
            </div>
        </div>
    </div>
    <div size="250" showcollapsebutton="true" visible="false" expanded="false">
        @{Html.RenderPartial("Partials/HelpPane");}
    </div>
</div>
@section Foot{
}
